package sef.domain;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table (name="employeeprojectdetail")
public class EmployeeProjectDetail {
	
	public EmployeeProjectDetail() {
		
	}
	@Id
	@Column(name="ID")
	@GeneratedValue(strategy=GenerationType.SEQUENCE)
	private long id;
	@OneToOne
	private Project project;
	
	@OneToMany(mappedBy="employeeprojectdetail")
	private List<ProjectRole> projectRoles;
	
	@ManyToOne
	private EmployeeDetail employeedetail;
	
	public EmployeeProjectDetail(Project project, List<ProjectRole> projectRoles) {
		super();
		this.project = project;
		this.projectRoles = projectRoles;
	}
	
	public List<ProjectRole> getProjectRoles() {
		return projectRoles;
	}

	public void setProjectRoles(List<ProjectRole> projectRoles) {
		this.projectRoles = projectRoles;
	}

	public Project getProject() {
		return project;
	}

	public void setProject(Project project) {
		this.project = project;
	}

}
